package com.lzhsite.technology.designPattern.command.RestaurantDemo;

public class DuckCommand implements ICommand
{
    private int tableNumber;
    private ICook cook = null;

    public DuckCommand(int tableNumber)
    {
        this.tableNumber = tableNumber;
    }

    public void setCook(ICook cook)
    {
        this.cook = cook;
    }

    public int getTableNumber()
    {
        return this.tableNumber;
    }

    public void execute()
    {
        this.cook.cook(tableNumber, "北京烤鸭");
    }
}
